package com.hakim.wfb.common.enums;

/**
 * Created by Administrator on 2017/7/2.
 */
public enum TransTypeEnum {

    INVESTMENT(1, "投资"),
    TRANSFER(2, "转账"),
    RECHARGE(3, "充值"),
    WITHDRAWAL(4, "提现"),
    PROFIT(5, "分红"),
    SHOPPING(6, "商城消费"),
    ELTOORG(7, "电子积分消费"),
    ACTIVITY(8, "激活积分消费"),
    SYSTRANS(9, "系统积分划拨"),
    EXCHANGE(10, "积分兑换");

    private int value;
    private String description;

    private TransTypeEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static TransTypeEnum getByValue(int value) {
        TransTypeEnum[] codes = values();
        for (TransTypeEnum each : codes) {
            if (each.value == value) {
                return each;
            }
        }
        return null;
    }
}
